package cn.jiyun.ai.controller;

import cn.jiyun.ai.common.Result;
import cn.jiyun.ai.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/doctor/")
public class DoctorController {
    @Autowired
    DoctorService doctorService;

    @GetMapping("findDoctorList")
    public Result findList(){
        return doctorService.findDoctorList();
    }

    @PostMapping("selectDoctorById/{id}")
    public Result selectDoctorById(@PathVariable("id") Integer id){
        return doctorService.selectDoctorById(id);
    }
}
